<?php
require './vendor/autoload.php';
use QL\QueryList;
/**
 * aes加密
 * @param $str
 * @return string
 */
 function aesEncrypt($str,$ak,$sk)
{
    return base64_encode(openssl_encrypt($str,'AES-128-CBC',$ak, 1, $sk));
}

/**
 * aes解密
 * @param $str
 * @return string
 */
 function aesDecrypt($str,$ak,$sk)
{
    return openssl_decrypt(base64_decode($str), 'AES-128-CBC', $ak, 1, $sk);
}

 function createNonce($len){
    $strs="QWERTYUIOPASDFGHJKLZXCVBNM1234567890qwertyuiopasdfghjklzxcvbnm";
    return substr(str_shuffle($strs),mt_rand(0,strlen($strs)-11),$len);
}

$ak = 'asdawsfesadfgews';
$sk = '3333111111111112';
/*$ak = 'VkhRW0C521ZMYuqF';
$sk = 'CE0J99-gsI-acW1P';*/

$timestamp = time();
$nonce = createNonce(6);

$onlineHost = 'http://imapicloud.204206.pw:7000/';
$localHost = 'http://127.0.0.1:9501/';
$host  = $localHost;
$token = file_get_contents('token');
$mobile = '18205921383';

#获取国家代码
/*$param = array(
    'mobile'=>'15959285805',
    'country_code'=>'+86',
);
$content = aesEncrypt(json_encode($param));
$form = [
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  aesEncrypt($nonce),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::get($host.'CountryCode',$form);

$reponseArr = json_decode($ret->getHtml(),true);

$data = json_decode(aesDecrypt($reponseArr['result']),true);
var_dump($data);die;*/

#获取路由服务器
/*$param = '';
$content = aesEncrypt(json_encode($param),$ak,$sk);
$form = [
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  aesEncrypt($nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::get('http://129.211.114.112:55048/Server',$form,[
    'headers' => [
        'access_key' =>$ak,
    ]
]);

echo $ret->getHtml();
$reponseArr = json_decode($ret->getHtml(),true);
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);
var_dump($data);die;*/

#注册账号
/*
$param = array(
    'mobile'=>'15959285805',
    'code'=>1122,
    'nickname'=>'昵称',
    'country_code'=>'+86',
);
$content = aesEncrypt(json_encode($param));
try{
    $ret = QueryList::post('http://106.52.140.176:9501/User',[
        'sign' => md5($content.$timestamp.$nonce),
        'nonce' =>  $nonce,
        'timestamp'=>$timestamp,
        'content'=>$content
    ]);
}catch (ExceptionWithThrowable $e){
    echo 222;die;
    var_dump($e);
}
echo 1111;die;
var_dump($ret);die;*/
#获取验证码 短信
/*$param = array(
    'mobile'=>$mobile,
    'country_code'=>'+86',
);

$content = aesEncrypt(json_encode($param),$ak,$sk);
$ret = QueryList::post($host.'Sms',[
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  $nonce,
    'timestamp'=>$timestamp,
    'content'=>$content
]);
echo 'md5:'.md5($content.$timestamp.$nonce).PHP_EOL;
echo  'nonce:'.$nonce.PHP_EOL;
echo 'timestamp:'.$timestamp.PHP_EOL;
echo 'content:'.$content;
$reponse = $ret->getHtml();

$reponseArr = json_decode($reponse,true);
var_dump($reponseArr);echo PHP_EOL;
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);
var_dump($data );*/
//登录
/*$param = array(
    'mobile'=>$mobile,
     'code'=>1111,
   # 'password'=>'4297f44b13955235245b2497399d7a93',
    'country_code'=>'+86',
);

$content = aesEncrypt(json_encode($param),$ak,$sk);
$query = [
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  aesEncrypt($nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::post($host.'Login',$query);

$reponse = $ret->getHtml();
echo $reponse.PHP_EOL;
$reponseArr = json_decode($reponse,true);
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);
file_put_contents('token',$data['token']);
file_put_contents('token_'.$param['mobile'],$data['token']);
var_dump($data);*/

$token = file_get_contents('./token');

#身份证识别


/*$frontFile = './1.jpg';
$img = file_get_contents($frontFile);
$img = base64_encode($img);
$backFile = '';
$param = array(
    'image'=>$img,
    'side'=>'front',
);

var_dump($param);
$content = aesEncrypt(json_encode($param),$ak,$sk);
$query = [
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  aesEncrypt($nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::post($host.'/IdOcr',$query
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
echo $reponse ;
$reponseArr = json_decode($reponse,true);
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);

var_dump($data);*/
#实名认证

/*$param = array(
    'real_name'=>'简庆旺',
    'idnumber'=>'350627199106223514',
  #  'image'=>'http://cdn.wangtuizhijia.com/20200827114329597.png'
    'image'=>'http://cdn.wangtuizhijia.com/0/FhIn5eW2Z8PWBs9Von5TZZ52BHql'
);

$content = aesEncrypt(json_encode($param),$ak,$sk);
$query = [
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  aesEncrypt($nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::post($host.'/User/RegisterRealName',$query
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
echo $reponse ;
$reponseArr = json_decode($reponse,true);
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);

var_dump($data);die;*/
#添加收藏
/*$param = array(
    'from_id'=>'1',
    'type'=>1,
    'content'=>'asfdaesfe',
);

$content = aesEncrypt(json_encode($param),$ak,$sk);
$query = [
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  aesEncrypt($nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::post($host.'/Collect',$query
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
echo $reponse ;
$reponseArr = json_decode($reponse,true);
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);

var_dump($data);*/
#删除收藏
/*$param = array(
    'id'=>2,
);

$content = aesEncrypt(json_encode($param),$ak,$sk);
$query = [
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  aesEncrypt($nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::post($host.'/Collects',$query
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
echo $reponse ;
$reponseArr = json_decode($reponse,true);
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);
var_dump($data);
*/
#编辑收藏
/*$param = array(
    'id'=>3,
    'content'=>'你好啊'
);

$content = aesEncrypt(json_encode($param),$ak,$sk);
$query = [
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  aesEncrypt($nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::get($host.'/Collects',$query
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
echo $reponse ;
$reponseArr = json_decode($reponse,true);
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);
var_dump($data);*/
#收藏列表
/*$param = array(
    'page'=>1,
    'limit'=>10
);

$content = aesEncrypt(json_encode($param),$ak,$sk);
$query = [
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  aesEncrypt($nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::get($host.'/Collect',$query
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);
$reponse = $ret->getHtml();
echo $reponse ;
$reponseArr = json_decode($reponse,true);
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);

var_dump($data);*/

#修改密码
/*$param = array(
    'new_password'=>'dsadsfsefgseg',
    'password'=>'dsadsfsefgseg'
);

$content = aesEncrypt(json_encode($param),$ak,$sk);
$query = [
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  aesEncrypt($nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::get($host.'/User/Password',$query
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
echo $reponse ;
$reponseArr = json_decode($reponse,true);
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);

var_dump($data);*/
#重置密码
/*$param = array(
    'code'=>1111,
    'new_password'=>'asfsedfsegfrsg',
    'mobile'=>$mobile
);

$content = aesEncrypt(json_encode($param),$ak,$sk);
$query = [
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  aesEncrypt($nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::get($host.'User/ResetPassword',$query
    ,[
        'headers' => [
           # 'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
echo $reponse ;
$reponseArr = json_decode($reponse,true);
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);

var_dump($data);*/
#修改用户信息

/*$param = array(
    #  'code'=>1111,
   'birthday'=>63118485400,
   // 'nickname'=>'xiaoxiao',
    'head'=>'2/FgpDVYBxRf3vitjc1TBSuimYHu0H',
 //   'introduction'=>'你好吗',
   // 'sex'=>1
);

$content = aesEncrypt(json_encode($param),$ak,$sk);
$query = [
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  aesEncrypt($nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::get($host.'/Users',$query
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
echo $reponse ;
$reponseArr = json_decode($reponse,true);
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);

var_dump($data);*/

#通过二维码获取用户信息
/*$param = array(
    'qrcode'=>'9PKBMDuZGFC3v8Du76xIEg==',
);

$content = aesEncrypt(json_encode($param),$ak,$sk);
$query = [
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  aesEncrypt($nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::post($host.'Friend/Detail',$query
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();

$reponseArr = json_decode($reponse,true);
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);

var_dump($data);*/
#模糊搜索
/*$param = array(
    'keyword'=>'18205921383',
);

$content = aesEncrypt(json_encode($param));
$query = [
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  aesEncrypt($nonce),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::get($host.'Friend/Search',$query
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
echo $reponse;
$reponseArr = json_decode($reponse,true);
$data = json_decode(aesDecrypt($reponseArr['result']),true);

var_dump($data);*/
#好友申请列表
/*$param = array(
    'keyword'=>'15980935584',
    //  'country_code'=>'+86',
);

$content = aesEncrypt(json_encode($param));
$ret = QueryList::get($host.'FriendApply',[
        'sign' => md5($content.$timestamp.$nonce),
        'nonce' =>  $nonce,
        'timestamp'=>$timestamp,
        'content'=>$content
    ]
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);
var_dump($ret->getHtml() );*/

#添加好友
/*$param = array(
    'keyword'=>'572f01b0988e33369ad8ff0d3cd440a9',
  //  'country_code'=>'+86',
);

$content = aesEncrypt(json_encode($param));
$ret = QueryList::post($host.'FriendApply',[
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  $nonce,
    'timestamp'=>$timestamp,
    'content'=>$content
]
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);
var_dump($ret->getHtml() );*/

#通过好友审核
/*$param = array(
    'id'=>'7',
    'status'=>'1',
);

$content = aesEncrypt(json_encode($param));
echo json_encode([
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  aesEncrypt($nonce),
    'timestamp'=>$timestamp,
    'content'=>$content
]);die;
$ret = QueryList::post('http://192.168.2.120:9501/FriendApply',[
        'sign' => md5($content.$timestamp.$nonce),
        'nonce' =>  $nonce,
        'timestamp'=>$timestamp,
        'content'=>$content
    ]
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);
var_dump($ret );*/



#获取用户详情
/*$param = array(
);

$content = aesEncrypt(json_encode($param),$ak,$sk);
echo json_encode($param).PHP_EOL;
echo $content;
$ret = QueryList::get($host.'User',[
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' =>  $nonce,
    'timestamp'=>$timestamp,
    'content'=>$content
],[
'headers' => [
    'token' =>$token,
]
]
);

$reponse = $ret->getHtml();

$reponseArr = json_decode($reponse,true);
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);
var_dump($data);die;*/

#我的群
/*$param = array(
'type'=>0
);

$content = aesEncrypt(json_encode($param),$ak,$sk);

$ret = QueryList::get($host.'Group',[
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
],[
        'headers' => [
            'token' =>$token,
        ]
    ]
);
$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);

var_dump($data );*/
#我的好友
/*$param = array(
);

$content = aesEncrypt(json_encode($param),$ak,$sk);

$ret = QueryList::get('http://127.0.0.1:9501/Friend',[
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
],[
        'headers' => [
            'token' =>$token,
        ]
    ]
);
$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);
echo aesDecrypt($reponseArr['result'],$ak,$sk);die;
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);
var_dump($data);die;*/
#编辑好友
/*$param = array(
    'id'=>13,
    'remark'=>'你好'
);

$content = aesEncrypt(json_encode($param),$ak,$sk);

$ret = QueryList::get($host.'Friends',[
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
],[
        'headers' => [
            'token' =>$token,
        ]
    ]
);
$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);
echo aesDecrypt($reponseArr['result'],$ak,$sk);die;
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);
var_dump($data);die;*/

#上传文件
/*$param = array(
);

$content = aesEncrypt(json_encode($param));

$ret = QueryList::post('http://127.0.0.1:9501/File',[
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce),
    'timestamp'=>$timestamp,
    'content'=>$content,
    'file'=>new \CURLFile(realpath('/token')),
],[
        'headers' => [
            'token' =>$token,
        ]
    ]
);
$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);

$data = json_decode(aesDecrypt($reponseArr['result']),true);

var_dump($data );*/

/*$param = array(
    'real_name'=>'减轻我',
    'idnumber'=>'350000000000000000',
    'bank_card'=>'6214838622364877',
    'country_code'=>'+86',
    'mobile'=>'18205921383',
    'code'=>'2859'
);

$content = aesEncrypt(json_encode($param));

$ret = QueryList::post('http://127.0.0.1:9501/UserBankCard',[
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce),
    'timestamp'=>$timestamp,
    'content'=>$content
],[
        'headers' => [
            'token' =>$token,
        ]
    ]
);

$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);
echo aesDecrypt($reponseArr['result']);die;
$data = json_decode(aesDecrypt($reponseArr['result']),true);*/

#用户详情
/*$param = array(
    'id'=>'6',
);

$content = aesEncrypt(json_encode($param));

$ret = QueryList::post('http://127.0.0.1:9501/UserBankCard',[
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce),
    'timestamp'=>$timestamp,
    'content'=>$content
],[
        'headers' => [
            'token' =>$token,
        ]
    ]
);

$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);
echo aesDecrypt($reponseArr['result']);die;
$data = json_decode(aesDecrypt($reponseArr['result']),true);*/


#获取区号
/*$param = array(

);

$content = aesEncrypt(json_encode($param));

$ret = QueryList::get('http://127.0.0.1:9501/CountryCode',[
    'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce),
    'timestamp'=>$timestamp,
    'content'=>$content
]
);

$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);
var_dump($reponseArr);
$data = json_decode(aesDecrypt($reponseArr['result']),true);
var_dump($data);*/

/*$param = array(
    'id'=>4
);

$content = aesEncrypt(json_encode($param));

$ret = QueryList::get('http://192.168.2.120:9501/CountryCode',[
        'sign' => md5($content.$timestamp.$nonce),
        'nonce' => aesEncrypt( $nonce),
        'timestamp'=>$timestamp,
        'content'=>$content
    ]
);
echo md5($content.$timestamp.$nonce).PHP_EOL;
echo aesEncrypt( $nonce).PHP_EOL;
echo $timestamp.PHP_EOL;
echo $content;die;
$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);
var_dump($reponseArr);
$data = json_decode(aesDecrypt($reponseArr['result']),true);
var_dump($data);*/

#添加好友
/*$param = array(
    'keyword'=>'18205921388',
    'country_code'=>'+86',
    'msg'=>'你好，加个好友呗'
);

$content = aesEncrypt(json_encode($param));
$req = [ 'sign' => md5($content.$timestamp.$nonce),
        'nonce' => aesEncrypt( $nonce),
        'timestamp'=>$timestamp,
        'content'=>$content
    ];
echo json_encode($req);die;
$ret = QueryList::post('http://192.168.2.120:9501/FriendApply', $req
);

$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);
var_dump($reponseArr);
$data = json_decode(aesDecrypt($reponseArr['result']),true);
var_dump($data);*/

/*$param = array(
    'keyword'=>'18205921388',
    'country_code'=>'+86',
    'msg'=>'你好，加个好友呗'
);

$content = aesEncrypt(json_encode($param));
$req = [ 'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::post('http://192.168.2.120:9501/FriendApply', $req
);

$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);
var_dump($reponseArr);
$data = json_decode(aesDecrypt($reponseArr['result']),true);
var_dump($data);*/

/*$param = array(
);

$content = aesEncrypt(json_encode($param));
$req = [ 'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::get('http://192.168.2.120:9501/File/QiniuToken', $req
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);
var_dump($reponseArr);
$data = json_decode(aesDecrypt($reponseArr['result']),true);
var_dump($data);*/


#创建群聊

/*$param = array(
    'user_ids'=>'1,2,4,5,6'
);

$content = aesEncrypt(json_encode($param));
$req = [ 'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::post($host.'Group', $req
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);
var_dump($reponseArr);
$data = json_decode(aesDecrypt($reponseArr['result']),true);
var_dump($data);*/

#退出群聊
/*$param = array(
    'group_id'=>'27'
);

$content = aesEncrypt(json_encode($param));
$req = [ 'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::get($host.'Groups', $req
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);
var_dump($reponseArr);
$data = json_decode(aesDecrypt($reponseArr['result']),true);
var_dump($data);*/
#邀请入群
/*$param = array(
    'group_id'=>'27',
    '1,2'=>'1,2'
);
$content = aesEncrypt(json_encode($param));
$req = [ 'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::get($host.'/Group/Invite', $req
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);
var_dump($reponseArr);
$data = json_decode(aesDecrypt($reponseArr['result']),true);
var_dump($data);*/
#我的好友
/*
$param = array(
);

$content = aesEncrypt(json_encode($param));
$req = [ 'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::get('http://127.0.0.1:9501/Friend', $req
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);
var_dump($reponseArr);
$data = json_decode(aesDecrypt($reponseArr['result']),true);
var_dump($data);*/

/*$param = array(
);

$content = aesEncrypt(json_encode($param));
$req = [ 'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::get('http://127.0.0.1:9501/Friend', $req
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);
var_dump($reponseArr);
$data = json_decode(aesDecrypt($reponseArr['result']),true);
var_dump($data);*/
#添加银行卡
/*$param = array(
    'mobile'=>'18205921383',
    'code'=>'1111',
    'bank_card'=>'6225768764592281',
    'real_name'=>'本杰明',
    'idnumber'=>111111111111111111
);
$content = aesEncrypt(json_encode($param));
$req = [ 'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::post($host.'/UserBankCard', $req
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);
var_dump($reponseArr);
$data = json_decode(aesDecrypt($reponseArr['result']),true);
var_dump($data);*/
#我的银行卡
/*$param = array(
);
$content = aesEncrypt(json_encode($param),$ak,$sk);
$req = [ 'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::get($host.'/UserBankCard', $req
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
$reponseArr = json_decode($reponse,true);
var_dump($reponseArr);
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);
var_dump($data);*/
#地区信息
/*$param = array(
);
$content = aesEncrypt(json_encode($param),$ak,$sk);
$req = [ 'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::get($host.'Area', $req
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
echo $reponse;
$reponseArr = json_decode($reponse,true);

$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);
file_put_contents('json',json_encode($data,JSON_UNESCAPED_UNICODE));*/
#城市
/*$param = array(
    'parent_id'=>3
);
$content = aesEncrypt(json_encode($param));
$req = [ 'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::get($host.'Area/City', $req
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
echo $reponse;
$reponseArr = json_decode($reponse,true);

$data = json_decode(aesDecrypt($reponseArr['result']),true);
file_put_contents('json',json_encode($data,JSON_UNESCAPED_UNICODE));*/
#县
/*$param = array(
    'parent_id'=>36
);
$content = aesEncrypt(json_encode($param));
$req = [ 'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::get($host.'Area/County', $req
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();
echo $reponse;
$reponseArr = json_decode($reponse,true);

$data = json_decode(aesDecrypt($reponseArr['result']),true);
file_put_contents('json',json_encode($data,JSON_UNESCAPED_UNICODE));*/
#全部地区信息
/*$param = array(
);
$content = aesEncrypt(json_encode($param),$ak,$sk);
$req = [ 'sign' => md5($content.$timestamp.$nonce),
    'nonce' => aesEncrypt( $nonce,$ak,$sk),
    'timestamp'=>$timestamp,
    'content'=>$content
];

$ret = QueryList::post($host.'Area', $req
    ,[
        'headers' => [
            'token' =>$token,
        ]
    ]);

$reponse = $ret->getHtml();

$reponseArr = json_decode($reponse,true);
$data = json_decode(aesDecrypt($reponseArr['result'],$ak,$sk),true);
$reponseArr['result'] = $data;
file_put_contents('json',json_encode($reponseArr,JSON_UNESCAPED_UNICODE));*/
